package xiangya.bysj.mapper.interf;

import java.util.LinkedList;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import xiangya.bysj.entity.Doctor;
import xiangya.bysj.online.OnlineDoctor;

/**
 * doctor数据操作的mapper类
 * 
 * @author Mr.zhang
 *
 */
public interface DoctorMapper extends MapperInterface<Doctor> {
	/**
	 * 通过id查找doctor
	 * 
	 * @param doctorId
	 * @return 返回查找到的doctor
	 * @throws Exception
	 */
	public Doctor selectById(int doctorId) throws Exception;

	/**
	 * 通过名字的部分信息模糊查找
	 * 
	 * @param doctorName
	 *            名字的一部分
	 * @return 返回查找到的结果集
	 * @throws Exception
	 */
	public List<Doctor> selectByPartName(@Param("doctorName") String doctorName,
			@Param("doctorStatus") int doctorStatus) throws Exception;

	
	public List<Doctor> selectUncheckedDoctor(@Param("offset") int offset) throws Exception;
	
	public int selectUncheckedDoctorCount() throws Exception;

	
	public void updateDoctorStatus(@Param("doctorId") int doctorId,
			@Param("doctorStatus") int doctorStatus)  throws Exception;
	
	public void updateDoctorDiploma(@Param("doctorId") int doctorId,
			@Param("doctorDiploma") String doctorDiploma)  throws Exception;
	/**
	 * 通过登陆账号查找
	 * 
	 * @param doctorCode
	 *            登陆账号
	 * @return 返回查找到的doctor
	 * @throws Exception
	 */
	public Doctor selectByCode(String doctorCode) throws Exception;

	/**
	 * 通过登陆账号删除
	 * 
	 * @param doctorCode
	 *            登陆账号
	 */
	public int deleteByCode(String doctorCode);

	
	public List<Doctor> selectAllDoctor();
}
